home *** CD-ROM | disk | FTP | other *** search
/ Virtual Sex With Asia / Virtual Sex With Asia.iso / pc / asia.dxr / Internal_11_--• Movie scripts, development.ls < prev    next >
Encoding:
Text File  |  1997-09-03  |  12.3 KB  |  328 lines

  1. on @ whichSprite
  2.   if the type of sprite whichSprite = 0 then
  3.     put "There is no sprite in channel " & whichSprite & "."
  4.   else
  5.     set item1 to "Sprite loc: " & point(the locH of sprite whichSprite, the locV of sprite whichSprite)
  6.     set centerH to ((the right of sprite whichSprite - the left of sprite whichSprite) / 2) + the left of sprite whichSprite
  7.     set centerV to ((the bottom of sprite whichSprite - the top of sprite whichSprite) / 2) + the top of sprite whichSprite
  8.     set item2 to "   Sprite center: " & point(centerH, centerV)
  9.     put item1 & item2
  10.   end if
  11. end
  12.  
  13. on ? whichSprite
  14.   if the type of sprite whichSprite = 0 then
  15.     put "There is no sprite in channel " & whichSprite & "."
  16.   else
  17.     set whichMember to the memberNum of sprite whichSprite
  18.     set whichMemberName to whichMember
  19.     if the name of member whichMember > 0 then
  20.       set whichMemberName to QUOTE & the name of member whichMember & QUOTE
  21.     end if
  22.     set item1 to "Sprite: " & whichSprite & "   member: " & whichMemberName & "   Type: " & the type of sprite whichSprite
  23.     set item1 to item1 & ", " & the type of member whichMember
  24.     set item2 to "   Ink: " & the ink of sprite whichSprite
  25.     set item3 to "   Sprite loc: " & point(the locH of sprite whichSprite, the locV of sprite whichSprite)
  26.     set item4 to "   Top left corner: " & point(the left of sprite whichSprite, the top of sprite whichSprite)
  27.     set item5 to "   Bottom right corner: " & point(the right of sprite whichSprite, the bottom of sprite whichSprite)
  28.     set item6 to "   Stretch: " & the stretch of sprite whichSprite & "   Cursor: " & the cursor of sprite whichSprite
  29.     set item7 to RETURN & RETURN & "To activate sprite [ whichSprite ] , copy this into your script:  "
  30.     set item8 to "activate [ whichSprite ] , " & whichMemberName & ", " & the type of sprite whichSprite & ", " & the ink of sprite whichSprite & ", "
  31.     if the stretch of sprite whichSprite = 0 then
  32.       set item9 to the locH of sprite whichSprite & ", " & the locV of sprite whichSprite & ", "
  33.       set item9 to item9 & QUOTE & QUOTE & ", " & QUOTE & QUOTE & ", " & QUOTE
  34.     else
  35.       set item9 to the left of sprite whichSprite & ", " & the top of sprite whichSprite & ", " & QUOTE & "stretch to:" & QUOTE & ", "
  36.       set item9 to item9 & the right of sprite whichSprite & ", " & the bottom of sprite whichSprite & RETURN
  37.     end if
  38.     put item1 & item2 & item3 & item4 & item5 & item6 & item7 & item8 & item9
  39.   end if
  40. end
  41.  
  42. on ! whichSprite
  43.   if value(whichSprite) > 0 then
  44.     if the type of sprite whichSprite = 0 then
  45.       put "Cursor location: " & point(the mouseH, the mouseV)
  46.       put "There is no sprite in channel " & whichSprite & "."
  47.     else
  48.       put "Cursor location: " & point(the mouseH, the mouseV)
  49.       set item1 to "Cursor location, relative to the top left corner of sprite " & whichSprite & ": "
  50.       set item2 to point(the mouseH - the left of sprite whichSprite, the mouseV - the top of sprite whichSprite)
  51.       put item1 & item2
  52.     end if
  53.   else
  54.     put "Cursor location: " & point(the mouseH, the mouseV)
  55.   end if
  56. end
  57.  
  58. on activate whichSprite, targetMember, targetType, targetInk, targetH, targetV, stretchBool, targetH2, targetV2
  59.   puppetSprite(whichSprite, 1)
  60.   set the type of sprite whichSprite to targetType
  61.   if stringp(targetMember) then
  62.     set the castNum of sprite whichSprite to the number of member targetMember
  63.   else
  64.     set the castNum of sprite whichSprite to targetMember
  65.   end if
  66.   set the ink of sprite whichSprite to targetInk
  67.   set the foreColor of sprite whichSprite to 255
  68.   set the backColor of sprite whichSprite to 0
  69.   set the locH of sprite whichSprite to targetH
  70.   set the locV of sprite whichSprite to targetV
  71.   if stretchBool = EMPTY then
  72.     set the stretch of sprite whichSprite to 0
  73.   else
  74.     set the stretch of sprite whichSprite to 1
  75.     if targetH2 <> EMPTY then
  76.       spriteBox(whichSprite, targetH, targetV, targetH2, targetV2)
  77.     end if
  78.   end if
  79.   set the immediate of sprite whichSprite to 1
  80. end
  81.  
  82. on deactivate spriteList
  83.   if listp(spriteList) then
  84.     set repeatLimit to count(spriteList)
  85.     repeat with theCount = 1 to repeatLimit
  86.       set whichSprite to getAt(spriteList, 1)
  87.       set the type of sprite whichSprite to 0
  88.       puppetSprite(whichSprite, 0)
  89.       deleteAt(spriteList, 1)
  90.     end repeat
  91.   end if
  92. end
  93.  
  94. on store spriteList
  95.   global gStoredSpriteInfo
  96.   if listp(spriteList) then
  97.     if not listp(gStoredSpriteInfo) then
  98.       set gStoredSpriteInfo to []
  99.       sort(gStoredSpriteInfo)
  100.     end if
  101.     set repeatLimit to count(spriteList)
  102.     repeat with theCount = 1 to repeatLimit
  103.       set x to getAt(spriteList, 1)
  104.       set spriteXinfo to [the type of sprite x]
  105.       if the type of sprite x > 0 then
  106.         append(spriteXinfo, the visible of sprite x)
  107.         append(spriteXinfo, the puppet of sprite x)
  108.         append(spriteXinfo, the castNum of sprite x)
  109.         append(spriteXinfo, the ink of sprite x)
  110.         append(spriteXinfo, the foreColor of sprite x)
  111.         append(spriteXinfo, the backColor of sprite x)
  112.         append(spriteXinfo, the locH of sprite x)
  113.         append(spriteXinfo, the locV of sprite x)
  114.         if QT(x) then
  115.           append(spriteXinfo, the movieTime of sprite x)
  116.           append(spriteXinfo, the movieRate of sprite x)
  117.         end if
  118.       end if
  119.       setAt(gStoredSpriteInfo, x, spriteXinfo)
  120.       deleteAt(spriteList, 1)
  121.     end repeat
  122.   end if
  123. end
  124.  
  125. on restore spriteList
  126.   global gStoredSpriteInfo
  127.   if listp(spriteList) then
  128.     if not listp(gStoredSpriteInfo) then
  129.       set gStoredSpriteInfo to []
  130.       sort(gStoredSpriteInfo)
  131.     end if
  132.     set repeatLimit to count(spriteList)
  133.     repeat with theCount = 1 to repeatLimit
  134.       set x to getAt(spriteList, 1)
  135.       if count(gStoredSpriteInfo) >= x then
  136.         set spriteXinfo to getAt(gStoredSpriteInfo, x)
  137.         if listp(spriteXinfo) then
  138.           set the type of sprite x to getAt(spriteXinfo, 1)
  139.           if getAt(spriteXinfo, 1) > 0 then
  140.             set the visible of sprite x to getAt(spriteXinfo, 2)
  141.             set the puppet of sprite x to getAt(spriteXinfo, 3)
  142.             set the castNum of sprite x to getAt(spriteXinfo, 4)
  143.             set the ink of sprite x to getAt(spriteXinfo, 5)
  144.             set the foreColor of sprite x to getAt(spriteXinfo, 6)
  145.             set the backColor of sprite x to getAt(spriteXinfo, 7)
  146.             set the locH of sprite x to getAt(spriteXinfo, 8)
  147.             set the locV of sprite x to getAt(spriteXinfo, 9)
  148.             if count(spriteXinfo) >= 11 then
  149.               set the movieTime of sprite x to getAt(spriteXinfo, 10)
  150.               set the movieRate of sprite x to getAt(spriteXinfo, 11)
  151.             end if
  152.           end if
  153.         end if
  154.       end if
  155.       deleteAt(spriteList, 1)
  156.     end repeat
  157.   end if
  158. end
  159.  
  160. on checkRange originalNumber, minValue, maxValue
  161.   case originalNumber < minValue of
  162.     1:
  163.       set originalNumber to minValue
  164.     otherwise:
  165.       case originalNumber > maxValue of
  166.         1:
  167.           set originalNumber to maxValue
  168.       end case
  169.   end case
  170.   return originalNumber
  171. end
  172.  
  173. on checkRangeWrap originalNumber, minValue, maxValue
  174.   case originalNumber < minValue of
  175.     1:
  176.       repeat while originalNumber < minValue
  177.         set originalNumber to maxValue - (minValue - originalNumber) + 1
  178.       end repeat
  179.     otherwise:
  180.       case originalNumber > maxValue of
  181.         1:
  182.           repeat while originalNumber > maxValue
  183.             set originalNumber to minValue + (originalNumber - maxValue) - 1
  184.           end repeat
  185.       end case
  186.   end case
  187.   return originalNumber
  188. end
  189.  
  190. on checkScripts checkSpritesToo
  191.   repeat with x = 1 to 1340
  192.     go(x)
  193.     set thisScriptMember to the frameScript
  194.     if thisScriptMember > 0 then
  195.       set thisScriptText to the scriptText of member thisScriptMember
  196.       if not (thisScriptText contains "exitFrame") then
  197.         put RETURN & "ΓÇóΓÇóΓÇó Frame " & x & ", Frame Script, member " & thisScriptMember & ":"
  198.         put RETURN & thisScriptText & RETURN
  199.       end if
  200.     end if
  201.     if checkSpritesToo then
  202.       repeat with y = 1 to 48
  203.         if the type of sprite y > 0 then
  204.           set thisScriptMember to the scriptNum of sprite y
  205.           if thisScriptMember > 0 then
  206.             set thisScriptText to the scriptText of member thisScriptMember
  207.             if not (thisScriptText contains "mouseDown") then
  208.               put RETURN & "ΓÇóΓÇóΓÇó Frame " & x & ", Sprite " & y & ", Sprite Script, member " & thisScriptMember & ":"
  209.               put RETURN & thisScriptText & RETURN
  210.             end if
  211.           end if
  212.         end if
  213.       end repeat
  214.     end if
  215.     if (x mod 50) = 0 then
  216.       put x & " Frames complete."
  217.       unloadMember()
  218.     end if
  219.   end repeat
  220.   put "Done."
  221.   beep(3)
  222. end
  223.  
  224. on bp beeps, message
  225.   if beeps < 1 then
  226.     set beeps to 1
  227.   end if
  228.   if message < 1 then
  229.     set message to "Beep!"
  230.   end if
  231.   put message
  232.   set oldSoundEnabled to the soundEnabled
  233.   set oldSoundLevel to the soundLevel
  234.   set the soundEnabled to 1
  235.   set the soundLevel to 7
  236.   beep(beeps)
  237.   set the soundEnabled to oldSoundEnabled
  238.   set the soundLevel to oldSoundLevel
  239. end
  240.  
  241. on moveQD whichSprite, borderWidth
  242.   if borderWidth < 1 then
  243.     set borderWidth to 0
  244.   end if
  245.   repeat with x = the frame to marker(1)
  246.     beginRecording()
  247.     go(x)
  248.     set the rect of sprite (whichSprite + 1) to rect(0, 0, 640, the top of sprite whichSprite - borderWidth)
  249.     set the rect of sprite (whichSprite + 2) to rect(0, 0, the left of sprite whichSprite - borderWidth, 480)
  250.     set the rect of sprite (whichSprite + 3) to rect(0, the bottom of sprite whichSprite + borderWidth, 640, 480)
  251.     set the rect of sprite (whichSprite + 4) to rect(the right of sprite whichSprite + borderWidth, 0, 640, 480)
  252.     updateFrame()
  253.     endRecording()
  254.   end repeat
  255.   put "Done."
  256.   beep()
  257. end
  258.  
  259. on eh
  260.   global gWhichMovie, gWhichClip
  261.   set whichClass to class()
  262.   put RETURN & RETURN
  263.   put "class (): " & whichClass
  264.   put "gWhichMovie: " & gWhichMovie & ",  getAt ( gWhichMovie, " & whichClass & " ): " & getAt(gWhichMovie, whichClass)
  265.   put "gWhichClip: " & gWhichClip & ",  getAt ( gWhichClip, " & whichClass & " ): " & getAt(gWhichClip, whichClass)
  266.   put RETURN & RETURN
  267. end
  268.  
  269. on eh2
  270.   setQuinVarsFaster()
  271.   put RETURN & "setQuinVarsFaster:" & RETURN
  272.   eh2.1()
  273.   setQuinVarsSlower()
  274.   put RETURN & "setQuinVarsSlower:" & RETURN
  275.   eh2.1()
  276. end
  277.  
  278. on eh2.1
  279.   eh2.2("gMissionaryToDoggy", count(gMissionaryToDoggy), count(getAt(gMissionaryToDoggyDef, 1)), count(getAt(gMissionaryToDoggyDef, 2)))
  280.   eh2.2("gDoggyToMissionary", count(gDoggyToMissionary), count(getAt(gDoggyToMissionaryDef, 1)), count(getAt(gDoggyToMissionaryDef, 2)))
  281.   eh2.2("gTopToReverseTop", count(gTopToReverseTop), count(getAt(gTopToReverseTopDef, 1)), count(getAt(gTopToReverseTopDef, 2)))
  282.   eh2.2("gReverseTopToTop", count(gReverseTopToTop), count(getAt(gReverseTopToTopDef, 1)), count(getAt(gReverseTopToTopDef, 2)))
  283.   eh2.2("gTopToReverseTop2", count(gTopToReverseTop2), count(getAt(gTopToReverseTop2Def, 1)), count(getAt(gTopToReverseTop2Def, 2)))
  284.   eh2.2("gReverseTopToTop2", count(gReverseTopToTop2), count(getAt(gReverseTopToTop2Def, 1)), count(getAt(gReverseTopToTop2Def, 2)))
  285.   eh2.2("gMissionaryToTop", count(gMissionaryToTop), count(getAt(gMissionaryToTopDef, 1)), count(getAt(gMissionaryToTopDef, 2)))
  286.   eh2.2("gDoggyToReverseTop", count(gDoggyToReverseTop), count(getAt(gDoggyToReverseTopDef, 1)), count(getAt(gDoggyToReverseTopDef, 2)))
  287. end
  288.  
  289. on eh2.2 var0, var1, var2, var3
  290.   if (var1 = var2) and (var1 = var3) then
  291.     put var0 & " values are all set to " & var1 & "."
  292.   else
  293.     put var0 & " values are not identical: " & var1 & ", " & var2 & ", " & var3 & "."
  294.   end if
  295. end
  296.  
  297. on eh3
  298.   set the scoreSelection to []
  299.   set startFrame to label("open") + 1
  300.   set stopFrame to label("open2") - 4
  301.   beginRecording()
  302.   repeat with x = startFrame to stopFrame
  303.     put "Executing frame " & x - startFrame + 1 & " of " & stopFrame - startFrame + 1
  304.     go(x)
  305.     repeat with y = 1 to 11
  306.       puppetSprite(y, 1)
  307.       set the scoreColor of sprite y to 1
  308.       set newLeft to 640 - (the left of sprite y - the locH of sprite y) - (11 - y)
  309.       set newTop to 479 - (the top of sprite y - the locV of sprite y)
  310.       set the loc of sprite y to point(newLeft, newTop)
  311.       puppetSprite(y, 0)
  312.       updateStage()
  313.     end repeat
  314.     updateFrame()
  315.   end repeat
  316.   endRecording()
  317.   bp(1)
  318.   put "Done."
  319. end
  320.  
  321. on reverseList whichList
  322.   set newList to []
  323.   repeat with x = count(whichList) down to 1
  324.     append(newList, getAt(whichList, x))
  325.   end repeat
  326.   return newList
  327. end
  328.